package com.lisa.music.system.controller;

import com.lisa.music.system.domain.entity.SysUser;
import com.lisa.music.system.mapper.SysUserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/user")
@CrossOrigin
public class SysUserController {
    @Autowired
    private SysUserMapper sysUserMapper;

    @GetMapping("/findAll")
    public List<SysUser> findAllUser() {
        //TODO 查询所有用户
        /*System.out.println("hello");*/
        sysUserMapper.findAllUser();
        return sysUserMapper.findAllUser();
    }

    @PostMapping("/login")
    public String login(@RequestBody Map<String, String> param) {
        System.out.println(param);
        return "";

    }
}

